﻿@{
    ViewBag.Title = "Upload Material";
    Layout = "~/Views/Shared/_Layout.cshtml";
    
    <script src="~/Scripts/jquery.form.min.js"></script>
    <script src="~/Scripts/gbh/MasterUpload.js"></script>
    <script>
        jQuery.fn.center = function () {
            this.css("position", "absolute");
            this.css("top", Math.max(0, (($(window).height() - $(this).outerHeight()) / 2) +
                                                        $(window).scrollTop()) + "px");
            this.css("left", Math.max(0, (($(window).width() - $(this).outerWidth()) / 2) +
                                                        $(window).scrollLeft()) + "px");
            return this;
        }
        jQuery('#LoadingImage').center();
    </script>
}

<h2>Upload Material</h2>
<div id="LoadingImage" >
    <img src="/img/circle-loading-animation.gif" alt="" style="width:200px;height:200px" />
</div>
<div style="float:left" id="uploadMat">
    <div class="easyui-panel" title="Upload Material" style="width: 350px; padding: 30px 70px 50px 70px;">
        <form target="_blank" enctype="multipart/form-data" method="post" action="/api/Upload/PostUploadSellOut/" id="ajaxUploadMat" novalidate="novalidate">
            <div style="margin-bottom: 20px">
                <div>IMPORT Material:</div>
                <input class="easyui-filebox" name="file1" data-options="prompt:'Choose a file...'" style="width: 100%">
            </div>

            <div>
                <input type="submit" value="Upload" id="ajaxUploadButton" class="btn">
            </div>
        </form>
    </div>
</div>
<div style="float:left">
    <div class="easyui-panel" title="Upload MinMax per mat" style="width: 350px; padding: 30px 70px 50px 70px">
        <form target="_blank" enctype="multipart/form-data" method="post" action="/api/Upload/PostUploadSellOut/" id="ajaxUploadMinMax" novalidate="novalidate">
            <div style="margin-bottom: 20px">
                <div>IMPORT MinMax file:</div>
                <input class="easyui-filebox" name="file1" data-options="prompt:'Choose a file...'" style="width: 100%">
            </div>

            <div>
                <input type="submit" value="Upload" id="ajaxUploadButtonMinMax" class="btn">
            </div>
        </form>
    </div>
</div>
<div style="float:left">
    <div class="easyui-panel" title="Upload Material Location" style="width: 350px; padding: 30px 70px 50px 70px">
        <form target="_blank" enctype="multipart/form-data" method="post" action="/api/Upload/PostUploadSellOut/" id="ajaxUploadMatBranch" novalidate="novalidate">
            <div style="margin-bottom: 20px">
                <div>IMPORT Material Location file:</div>
                <input class="easyui-filebox" name="file1" data-options="prompt:'Choose a file...'" style="width: 100%">
            </div>

            <div>
                <input type="submit" value="Upload" id="ajaxUploadButtonMaterialLocation" class="btn">
            </div>
        </form>
    </div>
</div>

<div style="float:left">
    <div class="easyui-panel" title="Upload Location" style="width: 350px; padding: 30px 70px 50px 70px">
        <form target="_blank" enctype="multipart/form-data" method="post" action="/api/Upload/PostUploadSellOut/" id="ajaxUploadBranch" novalidate="novalidate">
            <div style="margin-bottom: 20px">
                <div>IMPORT Location file:</div>
                <input class="easyui-filebox" name="file1" data-options="prompt:'Choose a file...'" style="width: 100%">
            </div>

            <div>
                <input type="submit" value="Upload" id="ajaxUploadButtonMaterialLocation" class="btn">
            </div>
        </form>
    </div>
</div>